package com.k7.mobile.platform.dao.impl;

import java.util.List;

import com.k7.mobile.platform.dao.ILogDAO;
import com.k7.mobile.platform.dataobject.LogDO;

@SuppressWarnings("unchecked")
public class LogDAOImpl extends BaseDAOImpl implements ILogDAO{
	
	@Override
	public List<LogDO> getLogList(LogDO queryDO) {
		return this.executeQueryForList("GET-LOG-LIST", "GET-LOG-LIST-COUNT", queryDO);
	}

	@Override
	public LogDO getLogById(Long id) {
		return (LogDO)this.getSqlMapClientTemplate().queryForObject("GET-LOG-BY-ID", id);
	}

	@Override
	public void addLog(LogDO logDO) {
		this.getSqlMapClientTemplate().insert("ADD-LOG", logDO);
	}

	@Override
	public void addLog(List<LogDO> logDOList) {
		this.executeDeleteBatch("ADD-LOG", logDOList);
	}
}
